home *** CD-ROM | disk | FTP | other *** search
/ Top 200 Programs / Top 200 Programs.iso / Bob8 / THOMPSON / LIBERTY / PRODUCT / LB14W.EXE / COMBOBOX.BAS < prev    next >
BASIC Source File  |  1997-03-10  |  1KB  |  57 lines

  1.  
  2.     'COMBOBOX.BAS  - a short combobox demo
  3.  
  4.     WindowWidth = 360
  5.     WindowHeight = 270
  6.  
  7.     array$(0) = "This"
  8.     array$(1) = "is"
  9.     array$(2) = "a"
  10.     array$(3) = "test"
  11.     array$(4) = "of"
  12.     array$(5) = "the"
  13.     array$(6) = "emergency"
  14.     array$(7) = "broadcast"
  15.     array$(8) = "system"
  16.  
  17.  
  18.     combobox #main.testcb, array$(, [selected], 26, 16, 136, 200
  19.     textbox #main.index, 182, 16, 136, 25
  20.     button #main, "Accept Selection", [accept], UL, 182, 51, 136, 25
  21.     statictext #main.instruct, "Hey", 182, 86, 136, 200
  22.  
  23.     open "untitled" for dialog as #main
  24.  
  25.     instruct$ = "Select an item in the combobox and watch the " + _
  26.         "number change, then change the number and hit Accept " + _
  27.         "Selection go the other way."
  28.  
  29.     print #main.instruct, instruct$
  30.  
  31. [main.inputLoop]   'wait here for input event
  32.     input aVar$
  33.     goto [main.inputLoop]
  34.  
  35.  
  36.  
  37. [selected]   'Perform action for the combobox named 'testcb'
  38.  
  39.     'Insert your own code here
  40.  
  41.     print #main.testcb, "selectionindex?"
  42.     input #main.testcb, xVar
  43.     print #main.index, str$(xVar)
  44.  
  45.     goto [main.inputLoop]
  46.  
  47.  
  48. [accept]   'Perform action for the button named 'accept'
  49.  
  50.     'Insert your own code here
  51.     print #main.index, "!contents?"
  52.     input #main.index, yVar
  53.     print #main.testcb, "selectindex "; yVar
  54.  
  55.     goto [main.inputLoop]
  56.  
  57.